﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

using PortalIntranet.DatabaseComponents.Administracao;
using PortalIntranet.DatabaseComponents.Comun;
using System.Data.Entity.ModelConfiguration;

namespace PortalIntranet.DatabaseComponents.WebParts.Galerias
{
	[Serializable]
	[Table("Galerias")]
	public class Galeria : Entidade
	{
		public Galeria()
		{
			this.Itens = new HashSet<GaleriaItem>();
		}

		[Required, MaxLength(50)]
		public string Nome { get; set; }

		#region WebPart
		public int WebPartId { get; set; }

		public virtual WebPart WebPart { get; set; }
		#endregion

		#region Navegação
		public virtual ICollection<GaleriaItem> Itens { get; set; }
		#endregion
	}
}
